import { FC } from "react";
import { View, Text } from "@tarojs/components";
import styles from "./index.module.less";
import Sestion from "../sestion";
import { UserInfo } from "@/service/type";

interface IProps {
  customerInfo: UserInfo;
}

const MemberInfo: FC<IProps> = ({ customerInfo }) => {
  return (
    <Sestion text="信息资料">
      <View className={styles["info-wrapper"]}>
        <View className={styles["line"]}>
          <Text className={styles["key"]}>昵称</Text>
          <Text className={styles["value"]}>{customerInfo.nickName}</Text>
        </View>
        <View className={styles["line"]}>
          <Text className={styles["key"]}>性别</Text>
          <Text className={styles["value"]}>{customerInfo.genderCn}</Text>
        </View>
        <View className={styles["line"]}>
          <Text className={styles["key"]}>婚史</Text>
          <Text className={styles["value"]}>
            {customerInfo.customerBasicInfo?.marriageHistoryCn}
          </Text>
        </View>
      </View>
    </Sestion>
  );
};

export default MemberInfo;
